package day06_exception_collection.com.itheima.d6_set;

import java.util.HashSet;

public class Demo3_Set {
    public static void main(String[] args) {
        HashSet<Student> sets = new HashSet<>();
        Student s1 =  new Student("张继科",'男', "借钱" );
        Student s2 = new Student("林丹",'男', "打球" );
        Student s3 = new Student("景甜",'女', "从前的张继科" );
        Student s4 = new Student("景甜",'女', "从前的张继科" );

        System.out.println("s3.hashCode() = " + s3.hashCode());
        System.out.println("s4.hashCode() = " + s4.hashCode());

        sets.add(s1);
        sets.add(s2);
        sets.add(s3);
        sets.add(s4);
        System.out.println(sets);
    }
}
